package com.ivanceras.client;

import java.util.ArrayList;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.RootPanel;
import com.ivanceras.client.view.QuestionEdit;

public class EditQuestionCaption extends HTML{
	public Question question;
	private final SimulationServiceAsync simulationService = GWT
	.create(SimulationService.class);

	public EditQuestionCaption(String caption,final Question question){
		this.setHTML(caption);
		this.question = question;
		this.addClickHandler(new ClickHandler(){

			@Override
			public void onClick(ClickEvent event) {
				QuestionEdit qne = new QuestionEdit(question.questionnaireID,question);
				RootPanel.get().add(qne.getWidget());
			}
			
		});
	}
}
